package com.aidong.chat.entity;

import java.io.Serializable;

/**
 * 聊天记录
 * @author user
 *
 */
public class ChatLogEntity implements Serializable , Comparable<ChatLogEntity> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int cid; // 流水号
	
	private int infoId; 
	
	private int idongId;
	
	private int id;
	
	private String date;
	
	private String time;
	
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getIdongId() {
		return idongId;
	}

	public void setIdongId(int idongId) {
		this.idongId = idongId;
	}

	private String otherNickName;
	
	private String otherHeadUrl;
	
	public String getOtherNickName() {
		return null == otherNickName ? "" : otherNickName;
	}

	public void setOtherNickName(String otherNickName) {
		this.otherNickName = otherNickName;
	}

	public String getOtherHeadUrl() {
		return null == otherHeadUrl ? "" : otherHeadUrl;
	}

	public void setOtherHeadUrl(String otherHeadUrl) {
		this.otherHeadUrl = otherHeadUrl;
	}

	private int sender; // 发送人
	
	private int recipient; // 接收人
	
	private int oppositer; // 聊天伙伴
	
	private String content; // 消息内容
	
	private String dateTime; // 时间戳
	
	private int pageSize; // 每页显示的条数
	
	private int pageCurrent; // 当前页
	
	private int status; // 状态
	
	public String getNickName() {
		return null == nickName ? "" : nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getHeadUrl() {
		return null == headUrl ? "" : headUrl;
	}

	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}

	private String nickName;
	
	private String headUrl;

	public int getOppositer() {
		return oppositer;
	}

	public void setOppositer(int oppositer) {
		this.oppositer = oppositer;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getCid() {
		return cid;
	}

	public void setCid(int cid) {
		this.cid = cid;
	}

	public int getSender() {
		return sender;
	}

	public void setSender(int sender) {
		this.sender = sender;
	}

	public int getRecipient() {
		return recipient;
	}

	public void setRecipient(int recipient) {
		this.recipient = recipient;
	}

	public String getContent() {
		return null == content ? "" : content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDateTime() {
		return null == dateTime ? "" : dateTime;
	}

	public void setDateTime(String dateTime) {
		this.dateTime = dateTime;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageCurrent() {
		return pageCurrent;
	}

	public void setPageCurrent(int pageCurrent) {
		this.pageCurrent = pageCurrent;
	}

	public int getInfoId() {
		return infoId;
	}

	public void setInfoId(int infoId) {
		this.infoId = infoId;
	}
	public int compareTo(ChatLogEntity o) {
		  if(this.time.compareTo(o.time)<0)return -1;
		  else if(this.time==o.time)return 0;
		  else return 1;
		 }
}
